(load "tiw-common")






(defun tiw-snippet-csharp ()
  (define-abbrev-table 'csharp-mode-abbrev-table '())
  (snippet-with-abbrev-table
   'csharp-mode-abbrev-table
   ("scon" . "System.Console.WriteLine($$);$;")
   ("sco" . "System.Console.Write($$);$;")
   ("main" . "public static void Main(string[] args)\n{$>\n$>$;\n}$>")
   ("sum" . "    /// <summary>$>
    /// </summary>$>
    /// <author>Ting Wang</author>$>
")
   ("if" . "if ($$){\n$>$;\n}$>")
   ("foreach" . "foreach ($$ in $$) {\n$>$;\n}$>")
   
))
(add-hook 'csharp-mode-hook  (lambda () (abbrev-mode 1)))
(add-hook 'cc-mode-hook  (lambda () (abbrev-mode 1)))
(add-hook 'csharp-mode-hook 'tiw-snippet-csharp)
(defun my-csharp-mode-hook ()
  (setq tab-width 4))
(add-hook 'csharp-mode-hook 'adapt-snippet)
(add-hook 'csharp-mode-hook 'my-csharp-mode-hook)
